import request from '@/utils/request'

///字典
export function dictMatching (data) {
  return request({
   url: '/system/dict/data/type/'+ data,
    method: 'get',
  })
}

export function billParameters(query) {
  return request({
    url: '/system/config/form',
    method: 'get',
    params: query
  })
}

// 订单执行明细
export function listOrderReport(query) {
  return request({
    url: '/om/order/report',
    method: 'get',
    params: query
  })
}

//  订单执行明细导出
export function exportOrderReport(query) {
  return request({
    url: '/om/order/report/export',
    method: 'get',
    params: query
  })
}

// 发货单明细
export function listDeliverReport(query) {
  return request({
    url: '/om/deliver/report',
    method: 'get',
    params: query
  })
}
// 发货单明细导出
export function exportDeliverReport(query) {
  return request({
    url: '/om/deliver/report/export',
    method: 'get',
    params: query
  })
}
// 退货单明细
export function listRejectReport(query) {
  return request({
    url: '/om/reject/report',
    method: 'get',
    params: query
  })
}
// 发货单明细导出
export function exportRejectReport(query) {
  return request({
    url: '/om/reject/report/export',
    method: 'get',
    params: query
  })
}

// 产品销售排名
export function listRankReport(query) {
  return request({
    url: '/om/order/rank',
    method: 'get',
    params: query
  })
}

// 发货单明细导出
export function exportRankReport(query) {
  return request({
    url: '/om/order/rank/export',
    method: 'get',
    params: query
  })
}


// 产品销售排名
export function listAchievementReport(query) {
  return request({
    url: '/om/order/statistics',
    method: 'get',
    params: query
  })
}

// 发货单明细导出
export function exportAchievementReport(query) {
  return request({
    url: '/om/order/statistics/export',
    method: 'get',
    params: query
  })
}

// 查询料品大类
export function materialSort() {
  return request({
    url: '/wm/warehouses/getSort',
    method: 'get',
  })
}

//销售订单明细
export function listDetailReport(query) {
  return request({
    url: '/om/order/orderDetail',
    method: 'get',
    params:query
  })
}

//销售订单明细导出
export function exportDetailReport(query) {
  return request({
    url: '/om/order/orderDetail/export',
    method: 'get',
    params:query
  })
}

//销售订单计划
export function listPlanReport(query) {
  return request({
    url: '/om/order/orderDetail/mp',
    method: 'get',
    params:query
  })
}

//销售订单明细导出
export function exportPlanReport(query) {
  return request({
    url: '/om/order/orderDetail/mp/export',
    method: 'get',
    params:query
  })
}

//根据sortName查找
export function listSortChild(query) {
  return request({
    url: '/inv/selectChild',
    method: 'get',
    params:query
  })
}